define("Neptuno.Util", ["jquery.mobile"], function($){
    var Util = {};
    Util.Message = function(title, message, type){
        this.title = title;
        this.message = message;
        this.type = type;
    }
    Util.notification = function(page, message){
        $(page + " .notifications").append(
            $("<li>").attr({
                "data-icon":"delete",
            })
            .addClass("notification")
            .addClass(message.type)
            .append(
                $("<a>").append($("<h3>").html(message.title), $("<p>").html(message.message))
                )
            ).listview('refresh');
    }
    
    $(".notification").live("click", function(){
        var notification = $(this);
        notification.animate({
            height:"hide"
        }, function(){
            notification.remove();
        })
    });
    return Util;
});


